﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace thailandProject.Models
{
    public class Test_Task
    {
        public enum TASK_TYPE { PICKUP = 0, DROPOFF = 1, CUSTOM = 2 };
        
        public string ClientName { get; set; }
        public TASK_TYPE Type { get; set; }
        public DateTime TaskEndDate { get; set; }
        public string ReservationLocation { get; set; }
        public string Notes { get; set; }
        public bool IsDone { get; set; }

        /// <summary>
        /// Returns testing data to the controller. Intended for testing use only
        /// </summary>
        /// <returns>IEnumerable containing test data</returns>
        public static IEnumerable<Test_Task> getTestingData()
        {
            //LinkedList is of type IEnumerable
            LinkedList<Test_Task> rt = new LinkedList<Test_Task>();

            #region Test_Task object 1
            Test_Task test1 = new Test_Task();
            test1.ClientName = "Joanne Jane";
            test1.Type = TASK_TYPE.PICKUP;
            test1.TaskEndDate = DateTime.Now;
            test1.ReservationLocation = "Apartment 214";
            test1.Notes = "Loves flowers in her room when she arrives\n\n" +
                "She is from my home town\n\n" +
                "She wants to ride an elephant\n\n" +
                "She registered a year and a half in advance";
            test1.IsDone = true;
            #endregion

            #region Test_Task object 2
            Test_Task test2 = new Test_Task();
            test2.ClientName = "John Smith";
            test2.Type = TASK_TYPE.DROPOFF;
            test2.TaskEndDate = new DateTime(2013, 4, 3, 18, 30, 0); //April 3rd, 2013 6:30 PM
            test2.ReservationLocation = "Condo 595";
            test2.Notes = "Love Jack Daniels in his apartment\n\n" +
                "Girlfriend loves poinsettias\n\n" +
                "This is his 4th reservation from me";
            test2.IsDone = false;
            #endregion

            #region Test_Task object 3
            Test_Task test3 = new Test_Task();
            test3.ClientName = "Pick up Groceries"; //I'll let the ClientName also double as a custom task title
            test3.Type = TASK_TYPE.CUSTOM;
            test3.TaskEndDate = new DateTime(2013, 4, 4); //April 4th, 2013
            test3.ReservationLocation = "";
            test3.Notes = "I need some vegetables and soy sauce";
            test3.IsDone = true;
            #endregion

            #region Test_Task object 4
            Test_Task test4 = new Test_Task();
            test4.ClientName = "Kill the Maid"; //I'll let the ClientName also double as a custom task title
            test4.Type = TASK_TYPE.CUSTOM;
            test4.TaskEndDate = new DateTime(2013, 4, 6); //April 6th, 2013
            test4.ReservationLocation = "";
            test4.Notes = "The garden has gone untended for far too long...";
            test4.IsDone = false;
            #endregion

            rt.AddLast(test1);
            rt.AddLast(test2);
            rt.AddLast(test3);
            rt.AddLast(test4);

            return rt;
        }
    }
}